<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>App::Cpan - easily interact with CPAN from the command line - Perldoc Browser</title>
    <link rel="search" href="https://perldoc.perl.org/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser">
    <link rel="canonical" href="https://perldoc.perl.org/App::Cpan">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" />
    <style>
      body {
        background: #f4f4f5;
        color: #020202;
      }
      .navbar-dark {
        background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0);
        background-repeat: repeat-x;
      }
      .navbar-dark .navbar-nav .nav-link,
      .navbar-dark .navbar-nav .nav-link:focus { color: #fff }
      .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 }
      #wrapperlicious {
        margin: 0 auto;
        font: 0.9em 'Helvetica Neue', Helvetica, sans-serif;
        font-weight: normal;
        line-height: 1.5em;
        margin: 0;
        padding: 0;
      }
      #wrapperlicious h1 { font-size: 1.5em }
      #wrapperlicious h2 { font-size: 1.3em }
      #wrapperlicious h3 { font-size: 1.1em }
      #wrapperlicious h4 { font-size: 0.9em }
      #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3,
      #wrapperlicious h4, #wrapperlicious dt {
        color: #020202;
        margin-top: 1em;
        margin-bottom: 1em;
        position: relative;
        font-weight: bold;
      }
      #wrapperlicious a { color: inherit; text-decoration: underline }
      #wrapperlicious #toc { text-decoration: none }
      #wrapperlicious a:hover { color: #2a2a2a }
      #wrapperlicious a img { border: 0 }
      #wrapperlicious :not(pre) > code {
        color: inherit;
        background-color: rgba(0, 0, 0, 0.04);
        border-radius: 3px;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        padding: 0.3em;
      }
      #wrapperlicious dd {
        margin: 0;
        margin-left: 2em;
      }
      #wrapperlicious dt {
        color: #2a2a2a;
        font-weight: bold;
        margin-left: 0.9em;
      }
      #wrapperlicious p {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious li > p {
        margin-bottom: 0;
        margin-top: 0;
      }
      #wrapperlicious pre {
        border: 1px solid #c1c1c1;
        border-radius: 3px;
        font: 100% Consolas, Menlo, Monaco, monospace;
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious pre > code {
        display: block;
        background-color: #f6f6f6;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        line-height: 1.5em;
        text-align: left;
        white-space: pre;
        padding: 1em;
      }
      #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious ul {
        list-style-type: square;
      }
      #wrapperlicious ul ul {
        margin-bottom: 0px;
        margin-top: 0px;
      }
      #footer {
        font-size: 0.8em;
        padding-top: 0.5em;
        text-align: center;
      }
      #more {
        display: inline;
        font-size: 0.8em;
      }
      #perldocdiv {
        background-color: #fff;
        border: 1px solid #c1c1c1;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
        margin-left: auto;
        margin-right: auto;
        padding: 3em;
        padding-top: 1em;
        max-width: 960px;
      }
      #moduleversion { float: right }
      #wrapperlicious .leading-notice {
        font-style: italic;
        padding-left: 1em;
        margin-top: 1em;
        margin-bottom: 1em;
      }
      #wrapperlicious .permalink {
        display: none;
        left: -0.75em;
        position: absolute;
        padding-right: 0.25em;
        text-decoration: none;
      }
      #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink,
      #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink,
      #wrapperlicious dt:hover .permalink {
        display: block;
      }
    </style>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'G-KVNWBNT5FB');
      gtag('config', 'UA-50555-3');
    </script>
  </head>
  <body>
    <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between">
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <a class="navbar-brand" href="https://perldoc.perl.org/">Perldoc Browser</a>
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="./App::Cpan.html#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.35.0</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-stable">
          <a class="dropdown-item" href="https://perldoc.perl.org/App::Cpan">Latest</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.2/App::Cpan">5.38.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.1/App::Cpan">5.38.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0/App::Cpan">5.38.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.3/App::Cpan">5.36.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.2/App::Cpan">5.36.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.1/App::Cpan">5.36.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.0/App::Cpan">5.36.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.3/App::Cpan">5.34.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.2/App::Cpan">5.34.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.1/App::Cpan">5.34.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.0/App::Cpan">5.34.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.1/App::Cpan">5.32.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.0/App::Cpan">5.32.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.3/App::Cpan">5.30.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.2/App::Cpan">5.30.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.1/App::Cpan">5.30.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.0/App::Cpan">5.30.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.3/App::Cpan">5.28.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.2/App::Cpan">5.28.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.1/App::Cpan">5.28.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.0/App::Cpan">5.28.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.3/App::Cpan">5.26.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.2/App::Cpan">5.26.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.1/App::Cpan">5.26.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.0/App::Cpan">5.26.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.4/App::Cpan">5.24.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.3/App::Cpan">5.24.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.2/App::Cpan">5.24.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.1/App::Cpan">5.24.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.0/App::Cpan">5.24.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.4/App::Cpan">5.22.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.3/App::Cpan">5.22.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.2/App::Cpan">5.22.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.1/App::Cpan">5.22.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.0/App::Cpan">5.22.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.3/App::Cpan">5.20.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.2/App::Cpan">5.20.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.1/App::Cpan">5.20.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.0/App::Cpan">5.20.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.4/App::Cpan">5.18.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.3/App::Cpan">5.18.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.2/App::Cpan">5.18.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.1/App::Cpan">5.18.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.0/App::Cpan">5.18.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.3/App::Cpan">5.16.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.2/App::Cpan">5.16.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.1/App::Cpan">5.16.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.0/App::Cpan">5.16.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.4/App::Cpan">5.14.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.3/App::Cpan">5.14.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.2/App::Cpan">5.14.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.1/App::Cpan">5.14.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.0/App::Cpan">5.14.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.5/App::Cpan">5.12.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.4/App::Cpan">5.12.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.3/App::Cpan">5.12.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.2/App::Cpan">5.12.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.1/App::Cpan">5.12.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.0/App::Cpan">5.12.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.1/App::Cpan">5.10.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.0/App::Cpan">5.10.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.9/App::Cpan">5.8.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.8/App::Cpan">5.8.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.7/App::Cpan">5.8.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.6/App::Cpan">5.8.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.5/App::Cpan">5.8.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.4/App::Cpan">5.8.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.3/App::Cpan">5.8.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.2/App::Cpan">5.8.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.1/App::Cpan">5.8.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.0/App::Cpan">5.8.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.2/App::Cpan">5.6.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.1/App::Cpan">5.6.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.0/App::Cpan">5.6.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_04/App::Cpan">5.005_04</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_03/App::Cpan">5.005_03</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_02/App::Cpan">5.005_02</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_01/App::Cpan">5.005_01</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005/App::Cpan">5.005</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="./App::Cpan.html#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-dev">
          <a class="dropdown-item" href="https://perldoc.perl.org/blead/App::Cpan">blead</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.6/App::Cpan">5.39.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.5/App::Cpan">5.39.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.4/App::Cpan">5.39.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.3/App::Cpan">5.39.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.2/App::Cpan">5.39.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.1/App::Cpan">5.39.1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC2/App::Cpan">5.38.0-RC2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC1/App::Cpan">5.38.0-RC1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.11/App::Cpan">5.37.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.10/App::Cpan">5.37.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.9/App::Cpan">5.37.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.8/App::Cpan">5.37.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.7/App::Cpan">5.37.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.6/App::Cpan">5.37.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.5/App::Cpan">5.37.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.4/App::Cpan">5.37.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.3/App::Cpan">5.37.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.2/App::Cpan">5.37.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.1/App::Cpan">5.37.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.0/App::Cpan">5.37.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.11/App::Cpan">5.35.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.10/App::Cpan">5.35.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.9/App::Cpan">5.35.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.8/App::Cpan">5.35.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.7/App::Cpan">5.35.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.6/App::Cpan">5.35.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.5/App::Cpan">5.35.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.4/App::Cpan">5.35.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.3/App::Cpan">5.35.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.2/App::Cpan">5.35.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.1/App::Cpan">5.35.1</a>
          <a class="dropdown-item active" href="./App::Cpan.html">5.35.0</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="./App::Cpan.html#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-nav">
          <a class="dropdown-item" href="perl.html">Perl</a>
          <a class="dropdown-item" href="perlintro.html">Intro</a>
          <a class="dropdown-item" href="perl.html#Tutorials">Tutorials</a>
          <a class="dropdown-item" href="perlfaq.html">FAQs</a>
          <a class="dropdown-item" href="perl.html#Reference-Manual">Reference</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlop.html">Operators</a>
          <a class="dropdown-item" href="functions.html">Functions</a>
          <a class="dropdown-item" href="variables.html">Variables</a>
          <a class="dropdown-item" href="modules.html">Modules</a>
          <a class="dropdown-item" href="perlutil.html">Utilities</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlcommunity.html">Community</a>
          <a class="dropdown-item" href="perlhist.html">History</a>
        </div>
      </li>
    </ul>
    <ul class="navbar-nav">
      <script>
        function set_expand (expand) {
          var perldocdiv = document.getElementById('perldocdiv');
          var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width');
          var expanded = (width == '' || width == 'none') ? true : false;
          if (expand === null) {
            expand = !expanded;
          }
          if ((expand && !expanded) || (!expand && expanded)) {
            perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px');
            var button_classlist = document.getElementById('content-expand-button').classList;
            if (expand) {
              button_classlist.add('btn-light');
              button_classlist.remove('btn-outline-light');
            } else {
              button_classlist.add('btn-outline-light');
              button_classlist.remove('btn-light');
            }
          }
          return expand;
        }
        function toggle_expand () {
          var expand = set_expand(null);
          document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC';
        }
        function read_expand () {
          return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 });
        }
        if (document.readyState === 'loading') {
          document.addEventListener('DOMContentLoaded', function () {
            if (read_expand()) {
              set_expand(true);
            }
          });
        } else if (read_expand()) {
          set_expand(true);
        }
      </script>
      <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-2" onclick="toggle_expand()">Expand</button>
    <ul>
    <form class="form-inline" method="get" action="https://perldoc.perl.org/5.35.0/search">
      <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search">
    </form>
  </div>
</nav>

    <div id="wrapperlicious" class="container-fluid">
      <div id="perldocdiv">
        <div id="links">
          <a href="./App::Cpan.html">App::Cpan</a>
          <div id="more">
            (<a href="./App::Cpan.txt">source</a>,
            <a href="https://metacpan.org/pod/App::Cpan">CPAN</a>)
          </div>
            <div id="moduleversion">version 1.676</div>
        </div>
        <div class="leading-notice">
          You are viewing the version of this documentation from Perl 5.35.0.
            This is a development version of Perl.
        </div>
        <h1><a id="toc">CONTENTS</a></h1>
                  <ul>
              <li>
                <a class="text-decoration-none" href="./App::Cpan.html#NAME">NAME</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./App::Cpan.html#SYNOPSIS">SYNOPSIS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./App::Cpan.html#DESCRIPTION">DESCRIPTION</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="./App::Cpan.html#Options">Options</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./App::Cpan.html#Examples">Examples</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./App::Cpan.html#Environment-variables">Environment variables</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./App::Cpan.html#Methods">Methods</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="./App::Cpan.html#EXIT-VALUES">EXIT VALUES</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./App::Cpan.html#TO-DO">TO DO</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./App::Cpan.html#BUGS">BUGS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./App::Cpan.html#SEE-ALSO">SEE ALSO</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./App::Cpan.html#SOURCE-AVAILABILITY">SOURCE AVAILABILITY</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./App::Cpan.html#CREDITS">CREDITS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./App::Cpan.html#AUTHOR">AUTHOR</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./App::Cpan.html#COPYRIGHT">COPYRIGHT</a>
              </li>
          </ul>

      <h1 id="NAME"><a class="permalink" href="./App::Cpan.html#NAME">#</a>NAME</h1>

<p>App::Cpan - easily interact with CPAN from the command line</p>

<h1 id="SYNOPSIS"><a class="permalink" href="./App::Cpan.html#SYNOPSIS">#</a>SYNOPSIS</h1>

<pre><code class="plaintext"># with arguments and no switches, installs specified modules
cpan module_name [ module_name ... ]

# with switches, installs modules with extra behavior
cpan [-cfFimtTw] module_name [ module_name ... ]

# use local::lib
cpan -I module_name [ module_name ... ]

# one time mirror override for faster mirrors
cpan -p ...

# with just the dot, install from the distribution in the
# current directory
cpan .

# without arguments, starts CPAN.pm shell
cpan

# without arguments, but some switches
cpan [-ahpruvACDLOPX]</code></pre>

<h1 id="DESCRIPTION"><a class="permalink" href="./App::Cpan.html#DESCRIPTION">#</a>DESCRIPTION</h1>

<p>This script provides a command interface (not a shell) to CPAN. At the moment it uses CPAN.pm to do the work, but it is not a one-shot command runner for CPAN.pm.</p>

<h2 id="Options"><a class="permalink" href="./App::Cpan.html#Options">#</a>Options</h2>

<dl>

<dt id="-a"><a class="permalink" href="./App::Cpan.html#-a">#</a><a id="a"></a>-a</dt>
<dd>

<p>Creates a CPAN.pm autobundle with CPAN::Shell-&gt;autobundle.</p>

</dd>
<dt id="-A-module-[-module-...-]"><a class="permalink" href="./App::Cpan.html#-A-module-%5B-module-...-%5D">#</a><a id="A-module-module"></a>-A module [ module ... ]</dt>
<dd>

<p>Shows the primary maintainers for the specified modules.</p>

</dd>
<dt id="-c-module"><a class="permalink" href="./App::Cpan.html#-c-module">#</a><a id="c-module"></a>-c module</dt>
<dd>

<p>Runs a `make clean` in the specified module&#39;s directories.</p>

</dd>
<dt id="-C-module-[-module-...-]"><a class="permalink" href="./App::Cpan.html#-C-module-%5B-module-...-%5D">#</a><a id="C-module-module"></a>-C module [ module ... ]</dt>
<dd>

<p>Show the <i>Changes</i> files for the specified modules</p>

</dd>
<dt id="-D-module-[-module-...-]"><a class="permalink" href="./App::Cpan.html#-D-module-%5B-module-...-%5D">#</a><a id="D-module-module"></a>-D module [ module ... ]</dt>
<dd>

<p>Show the module details. This prints one line for each out-of-date module (meaning, modules locally installed but have newer versions on CPAN). Each line has three columns: module name, local version, and CPAN version.</p>

</dd>
<dt id="-f"><a class="permalink" href="./App::Cpan.html#-f">#</a><a id="f"></a>-f</dt>
<dd>

<p>Force the specified action, when it normally would have failed. Use this to install a module even if its tests fail. When you use this option, -i is not optional for installing a module when you need to force it:</p>

<pre><code class="plaintext">% cpan -f -i Module::Foo</code></pre>

</dd>
<dt id="-F"><a class="permalink" href="./App::Cpan.html#-F">#</a><a id="F"></a>-F</dt>
<dd>

<p>Turn off CPAN.pm&#39;s attempts to lock anything. You should be careful with this since you might end up with multiple scripts trying to muck in the same directory. This isn&#39;t so much of a concern if you&#39;re loading a special config with <code>-j</code>, and that config sets up its own work directories.</p>

</dd>
<dt id="-g-module-[-module-...-]"><a class="permalink" href="./App::Cpan.html#-g-module-%5B-module-...-%5D">#</a><a id="g-module-module"></a>-g module [ module ... ]</dt>
<dd>

<p>Downloads to the current directory the latest distribution of the module.</p>

</dd>
<dt id="-G-module-[-module-...-]"><a class="permalink" href="./App::Cpan.html#-G-module-%5B-module-...-%5D">#</a><a id="G-module-module"></a>-G module [ module ... ]</dt>
<dd>

<p>UNIMPLEMENTED</p>

<p>Download to the current directory the latest distribution of the modules, unpack each distribution, and create a git repository for each distribution.</p>

<p>If you want this feature, check out Yanick Champoux&#39;s <code>Git::CPAN::Patch</code> distribution.</p>

</dd>
<dt id="-h"><a class="permalink" href="./App::Cpan.html#-h">#</a><a id="h"></a>-h</dt>
<dd>

<p>Print a help message and exit. When you specify <code>-h</code>, it ignores all of the other options and arguments.</p>

</dd>
<dt id="-i-module-[-module-...-]"><a class="permalink" href="./App::Cpan.html#-i-module-%5B-module-...-%5D">#</a><a id="i-module-module"></a>-i module [ module ... ]</dt>
<dd>

<p>Install the specified modules. With no other switches, this switch is implied.</p>

</dd>
<dt id="-I"><a class="permalink" href="./App::Cpan.html#-I">#</a><a id="I"></a>-I</dt>
<dd>

<p>Load <code>local::lib</code> (think like <code>-I</code> for loading lib paths). Too bad <code>-l</code> was already taken.</p>

</dd>
<dt id="-j-Config.pm"><a class="permalink" href="./App::Cpan.html#-j-Config.pm">#</a><a id="j-Config.pm"></a>-j Config.pm</dt>
<dd>

<p>Load the file that has the CPAN configuration data. This should have the same format as the standard <i>CPAN/Config.pm</i> file, which defines <code>$CPAN::Config</code> as an anonymous hash.</p>

<p>If the file does not exist, <code>cpan</code> dies.</p>

</dd>
<dt id="-J"><a class="permalink" href="./App::Cpan.html#-J">#</a><a id="J"></a>-J</dt>
<dd>

<p>Dump the configuration in the same format that CPAN.pm uses. This is useful for checking the configuration as well as using the dump as a starting point for a new, custom configuration.</p>

</dd>
<dt id="-l"><a class="permalink" href="./App::Cpan.html#-l">#</a><a id="l"></a>-l</dt>
<dd>

<p>List all installed modules with their versions</p>

</dd>
<dt id="-L-author-[-author-...-]"><a class="permalink" href="./App::Cpan.html#-L-author-%5B-author-...-%5D">#</a><a id="L-author-author"></a>-L author [ author ... ]</dt>
<dd>

<p>List the modules by the specified authors.</p>

</dd>
<dt id="-m"><a class="permalink" href="./App::Cpan.html#-m">#</a><a id="m"></a>-m</dt>
<dd>

<p>Make the specified modules.</p>

</dd>
<dt id="-M-mirror1,mirror2,..."><a class="permalink" href="./App::Cpan.html#-M-mirror1,mirror2,...">#</a><a id="M-mirror1-mirror2"></a>-M mirror1,mirror2,...</dt>
<dd>

<p>A comma-separated list of mirrors to use for just this run. The <code>-P</code> option can find them for you automatically.</p>

</dd>
<dt id="-n"><a class="permalink" href="./App::Cpan.html#-n">#</a><a id="n"></a>-n</dt>
<dd>

<p>Do a dry run, but don&#39;t actually install anything. (unimplemented)</p>

</dd>
<dt id="-O"><a class="permalink" href="./App::Cpan.html#-O">#</a><a id="O"></a>-O</dt>
<dd>

<p>Show the out-of-date modules.</p>

</dd>
<dt id="-p"><a class="permalink" href="./App::Cpan.html#-p">#</a><a id="p"></a>-p</dt>
<dd>

<p>Ping the configured mirrors and print a report</p>

</dd>
<dt id="-P"><a class="permalink" href="./App::Cpan.html#-P">#</a><a id="P"></a>-P</dt>
<dd>

<p>Find the best mirrors you could be using and use them for the current session.</p>

</dd>
<dt id="-r"><a class="permalink" href="./App::Cpan.html#-r">#</a><a id="r"></a>-r</dt>
<dd>

<p>Recompiles dynamically loaded modules with CPAN::Shell-&gt;recompile.</p>

</dd>
<dt id="-s"><a class="permalink" href="./App::Cpan.html#-s">#</a><a id="s"></a>-s</dt>
<dd>

<p>Drop in the CPAN.pm shell. This command does this automatically if you don&#39;t specify any arguments.</p>

</dd>
<dt id="-t-module-[-module-...-]"><a class="permalink" href="./App::Cpan.html#-t-module-%5B-module-...-%5D">#</a><a id="t-module-module"></a>-t module [ module ... ]</dt>
<dd>

<p>Run a `make test` on the specified modules.</p>

</dd>
<dt id="-T"><a class="permalink" href="./App::Cpan.html#-T">#</a><a id="T"></a>-T</dt>
<dd>

<p>Do not test modules. Simply install them.</p>

</dd>
<dt id="-u"><a class="permalink" href="./App::Cpan.html#-u">#</a><a id="u"></a>-u</dt>
<dd>

<p>Upgrade all installed modules. Blindly doing this can really break things, so keep a backup.</p>

</dd>
<dt id="-v"><a class="permalink" href="./App::Cpan.html#-v">#</a><a id="v"></a>-v</dt>
<dd>

<p>Print the script version and CPAN.pm version then exit.</p>

</dd>
<dt id="-V"><a class="permalink" href="./App::Cpan.html#-V">#</a><a id="V"></a>-V</dt>
<dd>

<p>Print detailed information about the cpan client.</p>

</dd>
<dt id="-w"><a class="permalink" href="./App::Cpan.html#-w">#</a><a id="w"></a>-w</dt>
<dd>

<p>UNIMPLEMENTED</p>

<p>Turn on cpan warnings. This checks various things, like directory permissions, and tells you about problems you might have.</p>

</dd>
<dt id="-x-module-[-module-...-]"><a class="permalink" href="./App::Cpan.html#-x-module-%5B-module-...-%5D">#</a><a id="x-module-module"></a>-x module [ module ... ]</dt>
<dd>

<p>Find close matches to the named modules that you think you might have mistyped. This requires the optional installation of Text::Levenshtein or Text::Levenshtein::Damerau.</p>

</dd>
<dt id="-X"><a class="permalink" href="./App::Cpan.html#-X">#</a><a id="X"></a>-X</dt>
<dd>

<p>Dump all the namespaces to standard output.</p>

</dd>
</dl>

<h2 id="Examples"><a class="permalink" href="./App::Cpan.html#Examples">#</a>Examples</h2>

<pre><code class="plaintext"># print a help message
cpan -h

# print the version numbers
cpan -v

# create an autobundle
cpan -a

# recompile modules
cpan -r

# upgrade all installed modules
cpan -u

# install modules ( sole -i is optional )
cpan -i Netscape::Booksmarks Business::ISBN

# force install modules ( must use -i )
cpan -fi CGI::Minimal URI

# install modules but without testing them
cpan -Ti CGI::Minimal URI</code></pre>

<h2 id="Environment-variables"><a class="permalink" href="./App::Cpan.html#Environment-variables">#</a><a id="Environment"></a>Environment variables</h2>

<p>There are several components in CPAN.pm that use environment variables. The build tools, <a href="./ExtUtils::MakeMaker.html">ExtUtils::MakeMaker</a> and <a href="./Module::Build.html">Module::Build</a> use some, while others matter to the levels above them. Some of these are specified by the Perl Toolchain Gang:</p>

<p>Lancaster Concensus: <a href="https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/lancaster-consensus.md">https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/lancaster-consensus.md</a></p>

<p>Oslo Concensus: <a href="https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/oslo-consensus.md">https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/oslo-consensus.md</a></p>

<dl>

<dt id="NONINTERACTIVE_TESTING"><a class="permalink" href="./App::Cpan.html#NONINTERACTIVE_TESTING">#</a>NONINTERACTIVE_TESTING</dt>
<dd>

<p>Assume no one is paying attention and skips prompts for distributions that do that correctly. <code>cpan(1)</code> sets this to <code>1</code> unless it already has a value (even if that value is false).</p>

</dd>
<dt id="PERL_MM_USE_DEFAULT"><a class="permalink" href="./App::Cpan.html#PERL_MM_USE_DEFAULT">#</a>PERL_MM_USE_DEFAULT</dt>
<dd>

<p>Use the default answer for a prompted questions. <code>cpan(1)</code> sets this to <code>1</code> unless it already has a value (even if that value is false).</p>

</dd>
<dt id="CPAN_OPTS"><a class="permalink" href="./App::Cpan.html#CPAN_OPTS">#</a>CPAN_OPTS</dt>
<dd>

<p>As with <code>PERL5OPT</code>, a string of additional <code>cpan(1)</code> options to add to those you specify on the command line.</p>

</dd>
<dt id="CPANSCRIPT_LOGLEVEL"><a class="permalink" href="./App::Cpan.html#CPANSCRIPT_LOGLEVEL">#</a>CPANSCRIPT_LOGLEVEL</dt>
<dd>

<p>The log level to use, with either the embedded, minimal logger or <a href="./Log::Log4perl.html">Log::Log4perl</a> if it is installed. Possible values are the same as the <code>Log::Log4perl</code> levels: <code>TRACE</code>, <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, and <code>FATAL</code>. The default is <code>INFO</code>.</p>

</dd>
<dt id="GIT_COMMAND"><a class="permalink" href="./App::Cpan.html#GIT_COMMAND">#</a>GIT_COMMAND</dt>
<dd>

<p>The path to the <code>git</code> binary to use for the Git features. The default is <code>/usr/local/bin/git</code>.</p>

</dd>
</dl>

<h2 id="Methods"><a class="permalink" href="./App::Cpan.html#Methods">#</a>Methods</h2>

<dl>

<dt id="run()"><a class="permalink" href="./App::Cpan.html#run()">#</a><a id="run"></a>run()</dt>
<dd>

<p>Just do it.</p>

<p>The <code>run</code> method returns 0 on success and a positive number on failure. See the section on EXIT CODES for details on the values.</p>

<p>CPAN.pm sends all the good stuff either to STDOUT, or to a temp file if $CPAN::Be_Silent is set. I have to intercept that output so I can find out what happened.</p>

<p>Stolen from File::Path::Expand</p>

</dd>
</dl>

<h1 id="EXIT-VALUES"><a class="permalink" href="./App::Cpan.html#EXIT-VALUES">#</a><a id="EXIT"></a>EXIT VALUES</h1>

<p>The script exits with zero if it thinks that everything worked, or a positive number if it thinks that something failed. Note, however, that in some cases it has to divine a failure by the output of things it does not control. For now, the exit codes are vague:</p>

<pre><code class="plaintext">1	An unknown error

2	The was an external problem

4	There was an internal problem with the script

8	A module failed to install</code></pre>

<h1 id="TO-DO"><a class="permalink" href="./App::Cpan.html#TO-DO">#</a><a id="TO"></a>TO DO</h1>

<p>* There is initial support for Log4perl if it is available, but I haven&#39;t gone through everything to make the NullLogger work out correctly if Log4perl is not installed.</p>

<p>* When I capture CPAN.pm output, I need to check for errors and report them to the user.</p>

<p>* Warnings switch</p>

<p>* Check then exit</p>

<h1 id="BUGS"><a class="permalink" href="./App::Cpan.html#BUGS">#</a>BUGS</h1>

<p>* none noted</p>

<h1 id="SEE-ALSO"><a class="permalink" href="./App::Cpan.html#SEE-ALSO">#</a><a id="SEE"></a>SEE ALSO</h1>

<p><a href="CPAN.html">CPAN</a>, <a href="./App::cpanminus.html">App::cpanminus</a></p>

<h1 id="SOURCE-AVAILABILITY"><a class="permalink" href="./App::Cpan.html#SOURCE-AVAILABILITY">#</a><a id="SOURCE"></a>SOURCE AVAILABILITY</h1>

<p>This code is in Github in the CPAN.pm repository:</p>

<pre><code class="plaintext">https://github.com/andk/cpanpm</code></pre>

<p>The source used to be tracked separately in another GitHub repo, but the canonical source is now in the above repo.</p>

<h1 id="CREDITS"><a class="permalink" href="./App::Cpan.html#CREDITS">#</a>CREDITS</h1>

<p>Japheth Cleaver added the bits to allow a forced install (<code>-f</code>).</p>

<p>Jim Brandt suggest and provided the initial implementation for the up-to-date and Changes features.</p>

<p>Adam Kennedy pointed out that <code>exit()</code> causes problems on Windows where this script ends up with a .bat extension</p>

<p>David Golden helps integrate this into the <code>CPAN.pm</code> repos.</p>

<p>Jim Keenan fixed up various issues with _download</p>

<h1 id="AUTHOR"><a class="permalink" href="./App::Cpan.html#AUTHOR">#</a>AUTHOR</h1>

<p>brian d foy, <code>&lt;bdfoy@cpan.org&gt;</code></p>

<h1 id="COPYRIGHT"><a class="permalink" href="./App::Cpan.html#COPYRIGHT">#</a>COPYRIGHT</h1>

<p>Copyright (c) 2001-2018, brian d foy, All Rights Reserved.</p>

<p>You may redistribute this under the same terms as Perl itself.</p>


      </div>
      <div id="footer">
        <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p>

<p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p>


      </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
    <script src="../highlight.pack.js"></script>
    <script>hljs.highlightAll();</script>
  </body>
</html>
